Optimal. Leaf size=103 \[ \frac {(c+d x)^3}{b}-\frac {3 d (c+d x)^2 \log \left (1+e^{2 (a+b x)}\right )}{b^2}-\frac {3 d^2 (c+d x) \text {PolyLog}\left (2,-e^{2 (a+b x)}\right )}{b^3}+\frac {3 d^3 \text {PolyLog}\left (3,-e^{2 (a+b x)}\right )}{2 b^4}+\frac {(c+d x)^3 \tanh (a+b x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {4269, 3799,
2221, 2611, 2320, 6724} \begin {gather*} \frac {3 d^3 \text {Li}_3\left (-e^{2 (a+b x)}\right )}{2 b^4}-\frac {3 d^2 (c+d x) \text {Li}_2\left (-e^{2 (a+b x)}\right )}{b^3}-\frac {3 d (c+d x)^2 \log \left (e^{2 (a+b x)}+1\right )}{b^2}+\frac {(c+d x)^3 \tanh (a+b x)}{b}+\frac {(c+d x)^3}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2221
Rule 2320
Rule 2611
Rule 3799
Rule 4269
Rule 6724
Rubi steps
\begin {align*} \int (c+d x)^3 \text {sech}^2(a+b x) \, dx &=\frac {(c+d x)^3 \tanh (a+b x)}{b}-\frac {(3 d) \int (c+d x)^2 \tanh (a+b x) \, dx}{b}\\ &=\frac {(c+d x)^3}{b}+\frac {(c+d x)^3 \tanh (a+b x)}{b}-\frac {(6 d) \int \frac {e^{2 (a+b x)} (c+d x)^2}{1+e^{2 (a+b x)}} \, dx}{b}\\ &=\frac {(c+d x)^3}{b}-\frac {3 d (c+d x)^2 \log \left (1+e^{2 (a+b x)}\right )}{b^2}+\frac {(c+d x)^3 \tanh (a+b x)}{b}+\frac {\left (6 d^2\right ) \int (c+d x) \log \left (1+e^{2 (a+b x)}\right ) \, dx}{b^2}\\ &=\frac {(c+d x)^3}{b}-\frac {3 d (c+d x)^2 \log \left (1+e^{2 (a+b x)}\right )}{b^2}-\frac {3 d^2 (c+d x) \text {Li}_2\left (-e^{2 (a+b x)}\right )}{b^3}+\frac {(c+d x)^3 \tanh (a+b x)}{b}+\frac {\left (3 d^3\right ) \int \text {Li}_2\left (-e^{2 (a+b x)}\right ) \, dx}{b^3}\\ &=\frac {(c+d x)^3}{b}-\frac {3 d (c+d x)^2 \log \left (1+e^{2 (a+b x)}\right )}{b^2}-\frac {3 d^2 (c+d x) \text {Li}_2\left (-e^{2 (a+b x)}\right )}{b^3}+\frac {(c+d x)^3 \tanh (a+b x)}{b}+\frac {\left (3 d^3\right ) \text {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{2 (a+b x)}\right )}{2 b^4}\\ &=\frac {(c+d x)^3}{b}-\frac {3 d (c+d x)^2 \log \left (1+e^{2 (a+b x)}\right )}{b^2}-\frac {3 d^2 (c+d x) \text {Li}_2\left (-e^{2 (a+b x)}\right )}{b^3}+\frac {3 d^3 \text {Li}_3\left (-e^{2 (a+b x)}\right )}{2 b^4}+\frac {(c+d x)^3 \tanh (a+b x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.36, size = 135, normalized size = 1.31 \begin {gather*} \frac {d \left (\frac {4 b^3 e^{2 a} x \left (3 c^2+3 c d x+d^2 x^2\right )}{1+e^{2 a}}-6 b^2 (c+d x)^2 \log \left (1+e^{2 (a+b x)}\right )-6 b d (c+d x) \text {PolyLog}\left (2,-e^{2 (a+b x)}\right )+3 d^2 \text {PolyLog}\left (3,-e^{2 (a+b x)}\right )\right )}{2 b^4}+\frac {(c+d x)^3 \text {sech}(a) \text {sech}(a+b x) \sinh (b x)}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(297\) vs.
\(2(101)=202\).
time = 1.52, size = 298, normalized size = 2.89
method | result | size |
risch | \(-\frac {2 \left (d^{3} x^{3}+3 c \,d^{2} x^{2}+3 c^{2} d x +c^{3}\right )}{\left ({\mathrm e}^{2 b x +2 a}+1\right ) b}+\frac {6 d \,c^{2} \ln \left ({\mathrm e}^{b x +a}\right )}{b^{2}}-\frac {3 d \,c^{2} \ln \left ({\mathrm e}^{2 b x +2 a}+1\right )}{b^{2}}+\frac {6 d^{3} a^{2} \ln \left ({\mathrm e}^{b x +a}\right )}{b^{4}}+\frac {2 d^{3} x^{3}}{b}-\frac {6 d^{3} a^{2} x}{b^{3}}-\frac {4 d^{3} a^{3}}{b^{4}}-\frac {3 d^{3} \ln \left ({\mathrm e}^{2 b x +2 a}+1\right ) x^{2}}{b^{2}}-\frac {3 d^{3} \polylog \left (2, -{\mathrm e}^{2 b x +2 a}\right ) x}{b^{3}}+\frac {3 d^{3} \polylog \left (3, -{\mathrm e}^{2 b x +2 a}\right )}{2 b^{4}}-\frac {12 d^{2} a c \ln \left ({\mathrm e}^{b x +a}\right )}{b^{3}}+\frac {6 d^{2} c \,x^{2}}{b}+\frac {12 d^{2} a c x}{b^{2}}+\frac {6 d^{2} c \,a^{2}}{b^{3}}-\frac {6 d^{2} c \ln \left ({\mathrm e}^{2 b x +2 a}+1\right ) x}{b^{2}}-\frac {3 d^{2} c \polylog \left (2, -{\mathrm e}^{2 b x +2 a}\right )}{b^{3}}\) | \(298\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 238 vs.
\(2 (100) = 200\).
time = 0.39, size = 238, normalized size = 2.31 \begin {gather*} 3 \, c^{2} d {\left (\frac {2 \, x e^{\left (2 \, b x + 2 \, a\right )}}{b e^{\left (2 \, b x + 2 \, a\right )} + b} - \frac {\log \left ({\left (e^{\left (2 \, b x + 2 \, a\right )} + 1\right )} e^{\left (-2 \, a\right )}\right )}{b^{2}}\right )} - \frac {3 \, {\left (2 \, b x \log \left (e^{\left (2 \, b x + 2 \, a\right )} + 1\right ) + {\rm Li}_2\left (-e^{\left (2 \, b x + 2 \, a\right )}\right )\right )} c d^{2}}{b^{3}} + \frac {2 \, c^{3}}{b {\left (e^{\left (-2 \, b x - 2 \, a\right )} + 1\right )}} - \frac {2 \, {\left (d^{3} x^{3} + 3 \, c d^{2} x^{2}\right )}}{b e^{\left (2 \, b x + 2 \, a\right )} + b} - \frac {3 \, {\left (2 \, b^{2} x^{2} \log \left (e^{\left (2 \, b x + 2 \, a\right )} + 1\right ) + 2 \, b x {\rm Li}_2\left (-e^{\left (2 \, b x + 2 \, a\right )}\right ) - {\rm Li}_{3}(-e^{\left (2 \, b x + 2 \, a\right )})\right )} d^{3}}{2 \, b^{4}} + \frac {2 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2}\right )}}{b^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains complex when optimal does not.
time = 0.43, size = 1332, normalized size = 12.93 \begin {gather*} -\frac {2 \, b^{3} c^{3} - 6 \, a b^{2} c^{2} d + 6 \, a^{2} b c d^{2} - 2 \, a^{3} d^{3} - 2 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + 3 \, a b^{2} c^{2} d - 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} \cosh \left (b x + a\right )^{2} - 4 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + 3 \, a b^{2} c^{2} d - 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) - 2 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + 3 \, a b^{2} c^{2} d - 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} \sinh \left (b x + a\right )^{2} + 6 \, {\left (b d^{3} x + b c d^{2} + {\left (b d^{3} x + b c d^{2}\right )} \cosh \left (b x + a\right )^{2} + 2 \, {\left (b d^{3} x + b c d^{2}\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + {\left (b d^{3} x + b c d^{2}\right )} \sinh \left (b x + a\right )^{2}\right )} {\rm Li}_2\left (i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right )\right ) + 6 \, {\left (b d^{3} x + b c d^{2} + {\left (b d^{3} x + b c d^{2}\right )} \cosh \left (b x + a\right )^{2} + 2 \, {\left (b d^{3} x + b c d^{2}\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + {\left (b d^{3} x + b c d^{2}\right )} \sinh \left (b x + a\right )^{2}\right )} {\rm Li}_2\left (-i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right )\right ) + 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3} + {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} \cosh \left (b x + a\right )^{2} + 2 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} \sinh \left (b x + a\right )^{2}\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) + i\right ) + 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3} + {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} \cosh \left (b x + a\right )^{2} + 2 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} \sinh \left (b x + a\right )^{2}\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) - i\right ) + 3 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + 2 \, a b c d^{2} - a^{2} d^{3} + {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + 2 \, a b c d^{2} - a^{2} d^{3}\right )} \cosh \left (b x + a\right )^{2} + 2 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + 2 \, a b c d^{2} - a^{2} d^{3}\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + 2 \, a b c d^{2} - a^{2} d^{3}\right )} \sinh \left (b x + a\right )^{2}\right )} \log \left (i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right ) + 1\right ) + 3 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + 2 \, a b c d^{2} - a^{2} d^{3} + {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + 2 \, a b c d^{2} - a^{2} d^{3}\right )} \cosh \left (b x + a\right )^{2} + 2 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + 2 \, a b c d^{2} - a^{2} d^{3}\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + 2 \, a b c d^{2} - a^{2} d^{3}\right )} \sinh \left (b x + a\right )^{2}\right )} \log \left (-i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right ) + 1\right ) - 6 \, {\left (d^{3} \cosh \left (b x + a\right )^{2} + 2 \, d^{3} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + d^{3} \sinh \left (b x + a\right )^{2} + d^{3}\right )} {\rm polylog}\left (3, i \, \cosh \left (b x + a\right ) + i \, \sinh \left (b x + a\right )\right ) - 6 \, {\left (d^{3} \cosh \left (b x + a\right )^{2} + 2 \, d^{3} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + d^{3} \sinh \left (b x + a\right )^{2} + d^{3}\right )} {\rm polylog}\left (3, -i \, \cosh \left (b x + a\right ) - i \, \sinh \left (b x + a\right )\right )}{b^{4} \cosh \left (b x + a\right )^{2} + 2 \, b^{4} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + b^{4} \sinh \left (b x + a\right )^{2} + b^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (c + d x\right )^{3} \operatorname {sech}^{2}{\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (c+d\,x\right )}^3}{{\mathrm {cosh}\left (a+b\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________